import React from 'react'
import ReactDOM from 'react-dom'
import Main from './main'
let isAddMtInit = false

export function reactRender() {
	if (isAddMtInit) return
	isAddMtInit = true
	const dom = document.getElementById('react-addMt-dialog')
	setTimeout(() => {
		ReactDOM.render(
			<React.StrictMode>
				<Main />
			</React.StrictMode>,
			dom
		)
	}, 0)
}
export function unmountRender() {
	isAddMtInit = false
	setTimeout(() => {
		ReactDOM.unmountComponentAtNode(document.getElementById('react-addMt-dialog') as Element)
	})
}
